    package com.example.autooperation.entity;

    public enum StepType {
        CLICK(0),
        INPUT(1),
        EXECUTE_CODE(2),
        OPEN_URL(3),
        INPUT_TEXT(4);

        private final int value;

        StepType(int value) {
            this.value = value;
        }

        public int getValue() {
            return value;
        }

        public static StepType fromValue(int value) {
            for (StepType type : StepType.values()) {
                if (type.getValue() == value) {
                    return type;
                }
            }
            throw new IllegalArgumentException("Invalid StepType value: " + value);
        }
    }